package com.ruoyi.tzai.domain;

import java.math.BigDecimal;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 音频文件对象 tzai_news_audio
 * 
 * @author tzai
 * @date 2025-10-27
 */
public class NewsAudio extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 音频ID */
    private Long audioId;

    /** 文章ID */
    @Excel(name = "文章ID")
    private Long articleId;

    /** 语言(cn中文 en英文) */
    @Excel(name = "语言", readConverterExp = "cn=中文,en=英文")
    private String language;

    /** 音频URL */
    @Excel(name = "音频URL")
    private String audioUrl;

    /** 文件元数据(FileInfo的JSON字符串，用于x-file-storage下载) */
    private String fileMetadata;

    /** 时长(秒) */
    @Excel(name = "时长(秒)")
    private BigDecimal duration;

    /** 词级时间戳(JSON) - 核心字段 */
    private String timestamps;

    /** TTS引擎 */
    @Excel(name = "TTS引擎")
    private String ttsEngine;

    /** 音色名称 */
    @Excel(name = "音色名称")
    private String voiceName;

    /** 文件大小(字节) */
    @Excel(name = "文件大小")
    private Long fileSize;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public Long getAudioId() {
        return audioId;
    }

    public void setAudioId(Long audioId) {
        this.audioId = audioId;
    }

    public Long getArticleId() {
        return articleId;
    }

    public void setArticleId(Long articleId) {
        this.articleId = articleId;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getAudioUrl() {
        return audioUrl;
    }

    public void setAudioUrl(String audioUrl) {
        this.audioUrl = audioUrl;
    }

    public String getFileMetadata() {
        return fileMetadata;
    }

    public void setFileMetadata(String fileMetadata) {
        this.fileMetadata = fileMetadata;
    }

    public BigDecimal getDuration() {
        return duration;
    }

    public void setDuration(BigDecimal duration) {
        this.duration = duration;
    }

    public String getTimestamps() {
        return timestamps;
    }

    public void setTimestamps(String timestamps) {
        this.timestamps = timestamps;
    }

    public String getTtsEngine() {
        return ttsEngine;
    }

    public void setTtsEngine(String ttsEngine) {
        this.ttsEngine = ttsEngine;
    }

    public String getVoiceName() {
        return voiceName;
    }

    public void setVoiceName(String voiceName) {
        this.voiceName = voiceName;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("audioId", getAudioId())
            .append("articleId", getArticleId())
            .append("language", getLanguage())
            .append("audioUrl", getAudioUrl())
            .append("duration", getDuration())
            .append("timestamps", getTimestamps())
            .append("ttsEngine", getTtsEngine())
            .append("voiceName", getVoiceName())
            .append("fileSize", getFileSize())
            .append("createTime", getCreateTime())
            .toString();
    }
}

